#include <iostream>
using namespace std;

const int N = 1e7 + 10;
int arr[N];

int main()
{
    int n, x;
    cin >> n >> x;

    for (int i = 1; i <= n; i++) cin >> arr[i];

    int L = 0, R = 0, sum = 0;
    int retLen = N, retL = -1, retR = -1;

    while (R <= n)
    {
        sum += arr[R];
        while (sum >= x)
        {
            if (R - L + 1 < retLen)
            {
                retL = L;
                retR = R;
                retLen = R - L + 1;
            }
            sum -= arr[L++];
        }
        R++;
    }

    cout << retL << ' ' << retR << endl;

    return 0;
}
